#!/usr/bin python 
# 推送配置，不过写完了感觉有些鸡肋。。。
from requests.api import head
from plugins.config.config_package import *

def post_push():
    token = ''
    title = 'WebFoxScanner 扫描结果'
    template = 'markdown'
    content = 'Found Vul!'

    push = 'http://www.pushplus.plus/send'

    data = {
        "token":token,
        "title":title,
        "content":content,
        "template":template
    }
    body=json.dumps(data).encode(encoding='utf-8')

    headers = {'Content-Type':'application/json'}

    res = requests.post(push,headers=headers,data=body)

def get_push():
    token = ''
    title = '推送测试'
    template = 'markdown'
    content = 'Found Vul!'

    push = 'http://www.pushplus.plus/send?token={}&title={}}&content={}&template={}'.format(token,title,content,template)

    res = requests.get(push)